package cmd

import (
    "fmt"
    "log"
    "net/rpc"
)

type ArithRequest struct {
    A string
    B []byte
}

type ArithResponse struct {
    Pro int 
    Quo int 
    Rem int 

}




func rpcClient(key string,value []byte) {


	conn, err := rpc.DialHTTP("tcp", "127.0.0.1:8095")
    if err != nil {
        log.Fatalln("dailing error: ", err)
    }

    req := ArithRequest{key, value}
    var res ArithResponse

    err = conn.Call("Arith.Multiply", req, &res) // 乘法运算
    if err != nil {
        log.Fatalln("arith error: ", err)
    }
    fmt.Println(res.Pro)

}
